<?php
session_start();
ob_start();
if (!isset($_SESSION['loggedin'])) {

    header('Location: login.php');
}
?>
<?php include 'index.php';?>
<div id="body-wrapper">


    <div id="main-content">


        <div class="content-box">


            <div class="content-box-header">

                <h3><?= Manage_Users ?></h3>

                <div class="clear"></div>

            </div> 

            <div class="content-box-content">

                <div class="tab-content default-tab" id="tab1"> 

                    <table>

                        <thead>
                            <tr>
                                <th><input class="check-all" type="checkbox" /></th>
                                <th><?= Username ?></th>
                                <th><?=Password ?></th>

                            </tr>

                        </thead>

                       
                        <tbody>
                            <?php
                            include 'connection.php';
                            $query = 'SELECT * FROM login';
                            $result = mysql_query($query);

                            while ($row = mysql_fetch_array($result)) {

                                echo '
                                            <tr>
                                        <td><input type="checkbox" /></td>
                                        <td>' . $row['name'] . '</td>
                                        <td>' . $row['password'] . '</td>

                                        <td>
                                            <!-- Icons -->
                                            <a href="UpdateUsers.php?type=User&ID='.$row['id'].'" title="Update"><img src="resources/images/icons/pencil.png" alt="Update" /></a>
                                            <a href="DeleteUsers.php?type=User&ID='.$row['id'].'" title="Delete" ><img src="resources/images/icons/cross.png"  alt="Delete" /></a>
                                            <a href="" title="Edit Meta"><img src="resources/images/icons/hammer_screwdriver.png" alt="Edit Meta" />
                                        </td>
                                    </tr>';
                            }

                            ?>
                        </tbody>
                    </table>

                </div> 

            </div>

        </div> 
    </div> 
</div>